package main

import (
	"context"
	"encoding/json"
	"fmt"
	"gitee.com/leo-xin/novel_distribution_sdk_go/yuewen"
	"gitee.com/leo-xin/novel_distribution_sdk_go/yuewen/config"
	"io"
)

func BookGetNovelInfo() {

	ctx := context.Background()

	configuration := config.NewConfiguration()
	apiClient := yuewen.Init(configuration).UseWechat()

	resp, httpRes, err := apiClient.BookGetNovelInfoApi().
		Get(ctx).
		ApiSecret(ApiSecret).Email(Email).BookId(10026093204563003).AppFlag("wxfxcqsc71437").
		Execute()

	s, _ := json.Marshal(resp)
	fmt.Println(string(s))

	resBytes, _ := io.ReadAll(httpRes.Body)
	fmt.Println(string(resBytes))
	fmt.Println(err)

}
